
package me.openphoto.android.app.provider;

import org.json.JSONObject;

import me.openphoto.android.app.net.UploadMetaData;
import android.net.Uri;

public class PhotoUpload {
    private final long mId;
    private final Uri mPhotoUri;
    private UploadMetaData mMetaData;
    private String mError;
    private boolean mIsAutoUpload;
    private JSONObject data;
    public PhotoUpload(long id, Uri photoUri, UploadMetaData metaData) {
        mId = id;
        mPhotoUri = photoUri;
        mMetaData = metaData;
    }
    public PhotoUpload(long id, Uri photoUri, JSONObject data) {
        mId = id;
        mPhotoUri = photoUri;
        this.data = data;
    }
    public long getId() {
        return mId;
    }

    public Uri getUri() {
        return Uri.withAppendedPath(UploadsProvider.CONTENT_URI, Long.toString(mId));
    }

    public UploadMetaData getMetaData() {
        return mMetaData;
    }

    public Uri getPhotoUri() {
        return mPhotoUri;
    }

    public String getError() {
        return mError;
    }

    public void setError(String error) {
        mError = error;
    }

    public boolean isAutoUpload() {
        return mIsAutoUpload;
    }

    public void setIsAutoUpload(boolean isAutoUpload) {
        mIsAutoUpload = isAutoUpload;
    }
	public JSONObject getData() {
		return data;
	}
	public void setData(JSONObject data) {
		this.data = data;
	}

}
